package com.boboPlanet.user.controller;

import com.boboPlanet.user.service.SystemAuthService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;

/**
 * @Description: TODO 系统授权认证控制器(生产环境专门搭建授权认证服务),此处以controller形式
 * @Author: mis_wu
 * @Date: 2023/5/10
 * @Company planet
 **/
@RestController
@RequestMapping("/sysAuth")
public class SystemAuthController {

    @Resource
    private SystemAuthService systemAuthService;

    @GetMapping("/getJwtClaimBySign")
    @ApiOperation(value = "校验jwt令牌是否存在")
    public Boolean getJwtClaimBySign(@RequestParam String sign){
        return systemAuthService.getJwtClaimBySign(sign);
    }

    @GetMapping("/judgeUserIsExpire")
    @ApiOperation(value = "判断当前认证信息是否过期")
    public Boolean judgeUserIsExpire(@RequestParam String sign){
        return systemAuthService.judgeUserIsExpire(sign);
    }

}
